﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SonCa.SocialNetwork.Accounts.IPresenters;
using SonCa.SocialNetwork.Accounts.Presenters;
using SonCa.SocialNetwork.Web.Accounts.IPresenters;
using SonCa.SocialNetwork.Web.Accounts.Presenters;
using Core.Components;

namespace SonCa.SocialNetwork.Accounts
{
    public partial class Login : System.Web.UI.Page, ILoginPresenter
    {
        private LoginPresenter _presenter;        

        protected void Page_Load(object sender, EventArgs e)
        {           
            _presenter = new LoginPresenter();
            _presenter.Init(this);                            
        }

        public void DisplayMessage(string Message)
        {
            lblmes.Text = Message;
        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            _presenter.Login(txtUsername.Text, txtPassword.Text);
        }
    }
}